package com.iotp.service.userUserRef;

import com.iotp.dao.userUserRef.UserUserRefDAO;
import com.iotp.entity.userUserRef.UserUserRef;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("userUserRefService")
public class UserUserRefServiceImpl implements UserUserRefService {
    @Autowired
    private UserUserRefDAO userUserRefDAO;
    @Override
    public Long add(UserUserRef userUserRef) {
        this.userUserRefDAO.insert(userUserRef);
        return userUserRef.getId();
    }

    @Override
    public List<UserUserRef> queryByCondition(UserUserRef userUserRef) {
        return this.userUserRefDAO.selectByCondition(userUserRef);
    }
}
